package easyzhou.com.service.impl;

import easyzhou.com.bean.SVNChangedLog;
import easyzhou.com.config.InitConfig;
import easyzhou.com.service.SVNLogParseService;
import easyzhou.com.utils.IOUtil;
import easyzhou.com.utils.svn.SVNLogHandler;

public class DefaultSVNLogParseServiceImpl implements SVNLogParseService {

	@Override
	public SVNChangedLog parse(String logs) {

		return SVNLogHandler.parse(logs);
	}

	public static void main(String[] args) {
		SVNChangedLog logContext = new DefaultSVNLogParseServiceImpl()
				.parse(IOUtil.toString(ClassLoader.getSystemResourceAsStream("db-svn-log.txt"), "utf-8"));
		logContext.setProductName(InitConfig.getPRODUCT_NAME());
		System.out.println(logContext);
	}
}
